import request from '@/utils/request';
import store from "@/store";

const env = import.meta.env.MODE || 'development';
const prefix = '';

// 列表 /apiapp/v1/user/list
export function userListApi (params) {
  return request({
    url: `${prefix}/apiapp/v1/user/list`,
    method: 'get',
    params
  });
}

// 详情 /apiapp/v1/user/details
export function userDetailApi (params) {
  return request({
    url: `${prefix}/apiapp/v1/user/details`,
    method: 'get',
    params
  });
}

// 新增 /apiapp/v1/user/create
export function userCreateApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/user/create`,
    method: 'post',
    data
  });
}

// 编辑 /apiapp/v1/user/edit
export function userEditApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/user/edit`,
    method: 'post',
    data
  });
}

// 删除 /apiapp/v1/user/delete
export function userDeleteApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/user/delete`,
    method: 'post',
    data
  });
}
